package com.example.fp.cgc.entity

import com.baomidou.mybatisplus.annotation.IdType
import com.baomidou.mybatisplus.annotation.TableField
import com.baomidou.mybatisplus.annotation.TableId
import com.baomidou.mybatisplus.annotation.TableName
import org.springframework.format.annotation.DateTimeFormat
import java.util.*

/**
 * @author 蔡
 * @since 2020-01-24
 * @property id id
 * @property tname 表格名
 * @property time 最后修改时间
 */
@TableName("data_state")
class DataState {
    @TableId(value = "id", type = IdType.AUTO)
    var id: Int = 0
    @TableField("tname")
    var tname: String = ""
    @TableField("time")
    @DateTimeFormat(pattern = "YYYY-MM-DD HH:MM:SS")
    var time: Date = Date()

    constructor(tname: String) {
        this.tname = tname
    }
}